import {Options} from "./types";

// 手指滑动方向
enum DIRECTION {
  up,
  down,
  left,
  right,
  static
}

const DEFAULT_OPTIONS: Options = {
  startX: 0,
  startY: 0,
  scrollX: false,
  scrollY: true,
  freeScroll: false,
  // click: false,
  tap: false,
  bounceTime: 800,
  momentum: true,
  momentumLimitTime: 300,
  momentumLimitDistance: 15,
  swipeTime: 2500,
  swipeBounceTime: 500,
  deceleration: 0.0015,
  flickLimitTime: 200,
  flickLimitDistance: 100,
  resizePolling: 60,
  preventDefault: true,
  stopPropagation: false,
  preventDefaultException: {
    tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/
  },
  // HWCompositing: true,
  // useTransition: true,
  // useTransform: true,
  bindToWrapper: false,
  // disableMouse: hasTouch,
  // disableTouch: !hasTouch,
  observeDOM: true,
  autoBlur: true, // 自动让激活的元素失去焦点

  // scrollbar: false,
  /**
   * for pull down and refresh
   * pullDownRefresh: {
   *   threshold: 50,
   *   stop: 20
   * }
   */
  pullDownRefresh: false,
  /**
   * for pull up and load
   * pullUpLoad: {
   *   threshold: 50
   * }
   */
  pullUpLoad: false,
  /**
   * for mouse wheel
   * mouseWheel: {
   *   speed: 20,
   *   invert: false,
   *   easeTime: 300
   * }
   */
  mouseWheel: false
};

export { DIRECTION, DEFAULT_OPTIONS };
